<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="button" value="随机点名"id="btn">
<select id="sel">
    <option>小华</option>
    <option>小兴</option>
    <option>小花</option>
    <option>小兰</option>
    <option>小红</option>
    <option>小明</option>
    <script>
        var btn=document.getElementById("btn");
        var sel=document.getElementById("sel")
        var options=sel.getElementsByTagName("option");
        btn.onclick=function(){
            var index=Math.floor(Math.random()*options.length);
            options[index].selected=true;
        }
    </script>

</select>
</body>
</html>